use "C:\Users\mjoshi2\Box\2024 Research\Colombia Data & Research\Research\Gender Research\GenderAnalysis\Data\2024-01-26Stipulationdata.dta" , clear

log using "C:\Users\mjoshi2\Box\2024 Research\Colombia Data & Research\Research\Gender Research\GenderAnalysis\Data\PSJ Data\PSJ Stipulation.smcl", replace
//Figure 2. Coefficient plot.
set seed 122475
xtologit imp_  point1_Gender point2_Gender point3_Gender point4_Gender point5_Gender, vce(cluster disposición)
estimates store m3
xtologit gender_imp_recode point1_Gender point2_Gender point3_Gender point4_Gender point5_Gender, vce(cluster disposición)
estimates store m4

coefplot (m3,  label(Non-gender perspective)) (m4,  label(Gender perspective)) ///
	||, drop(_cons) xline(0)   xscale(range(-3 2))
	

//Appendix Tables
//Table 2a. Descriptive Statistics for figures 2 and 3 in the manuscript
//Summary Stat
sum imp_  gender_imp_recode gender_binary gender_imp point1_Gender point2_Gender point3_Gender point4_Gender point5_Gender point6_Gender
sum imp_  if gender_binary==0
sum imp_  if gender_binary==1

//Appendix Table 3a. results for coefficient plot in the manuscript
xtologit imp_  point1_Gender point2_Gender point3_Gender point4_Gender point5_Gender, vce(cluster disposición)
xtologit gender_imp_recode point1_Gender point2_Gender point3_Gender point4_Gender point5_Gender, vce(cluster disposición)

//Data for Appendix figure 1
sum imp_ if gender_binary==0
sum imp_ if gender_binary==1
sum gender_imp_recode if gender_binary==1


//Appendix Table 5a. Student t-test on implementation status by gender and non-gender provisions
ttest imp_, by(gender_binary)

//Appendix Table 5b. Student t-test on implementation status of gender and non-gender provisions with gender perspectives for gender provisions

ttest gender_imp_recode, by(gender_binary)

//Appendix Table 5c. Model 1 Gender stipulation
xtologit imp_  gender_binary, vce(cluster disposición)
estimates store m1 
margins, dydx(gender_binary) 
marginsplot, yline(0) recastci(rarea) 

//Model 2 Gender adjusted imp coding
xtologit gender_imp_recode gender_binary, vce(cluster disposición)
estimates store m2
margins, dydx(gender_binary)
marginsplot, yline(0) recastci(rarea) 

coefplot (m1,  label(Non-gender perspective)) (m2,  label(Gender perspective)) ///
	||, drop(_cons) xline(0)   xscale(range(-3 2))

graph save Graph "C:\Users\mjoshi2\Box\2024 Research\Colombia Data & Research\Research\Gender Research\GenderAnalysis\Data\Bivariate_coef_plot.gph", replace

//Appendix Table 6a. Bivariate analysis with the last month of the data
ologit imp_ gender_binary if smdate =="apr_2023", vce(robust)
ologit gender_imp_recode gender_binary if smdate =="apr_2023", vce(robust)

//Appendix Table 6b. Replicate analysis for coefficient figure 2 with the last month of the data

ologit imp_  point1_Gender point2_Gender point3_Gender point4_Gender point5_Gender if smdate =="apr_2023", vce(robust)
ologit gender_imp_recode point1_Gender point2_Gender point3_Gender point4_Gender point5_Gender if smdate =="apr_2023", vce(robust)

//Appendix Table 6c. replicate for Figure 2 (Appendix Table 3c with interaction

xtologit imp_ gender_binary point1 point2  point3 point4  point5 point1_Gender, vce(cluster disposición)
xtologit imp_ gender_binary point1 point2  point3 point4  point5 point2_Gender, vce(cluster disposición)
xtologit imp_ gender_binary point1 point2  point3 point4  point5 point3_Gender, vce(cluster disposición)
xtologit imp_ gender_binary point1 point2  point3 point4  point5 point4_Gender, vce(cluster disposición)
xtologit imp_ gender_binary point1 point2  point3 point4  point5 point5_Gender, vce(cluster disposición)

xtologit gender_imp_recode  gender_binary point1 point2  point3 point4  point5 point1_Gender, vce(cluster disposición)
xtologit gender_imp_recode  gender_binary point1 point2  point3 point4  point5 point2_Gender, vce(cluster disposición)
xtologit gender_imp_recode  gender_binary point1 point2  point3 point4  point5 point3_Gender, vce(cluster disposición)
xtologit gender_imp_recode  gender_binary point1 point2  point3 point4  point5 point4_Gender, vce(cluster disposición)
xtologit gender_imp_recode  gender_binary point1 point2  point3 point4  point5 point5_Gender, vce(cluster disposición)

//Appendix Table 6d. last month of the data with interaction

ologit imp_ gender_binary point1 point2  point3 point4  point5 point1_Gender if smdate =="apr_2023", vce(robust)
ologit imp_ gender_binary point1 point2  point3 point4  point5 point2_Gender if smdate =="apr_2023", vce(robust)
ologit imp_ gender_binary point1 point2  point3 point4  point5 point3_Gender if smdate =="apr_2023", vce(robust)
ologit imp_ gender_binary point1 point2  point3 point4  point5 point4_Gender if smdate =="apr_2023", vce(robust)
ologit imp_ gender_binary point1 point2  point3 point4  point5 point5_Gender if smdate =="apr_2023", vce(robust)

ologit gender_imp_recode  gender_binary point1 point2  point3 point4  point5 point1_Gender if smdate =="apr_2023", vce(robust)
ologit gender_imp_recode  gender_binary point1 point2  point3 point4  point5 point2_Gender if smdate =="apr_2023", vce(robust)
ologit gender_imp_recode  gender_binary point1 point2  point3 point4  point5 point3_Gender if smdate =="apr_2023", vce(robust)
ologit gender_imp_recode  gender_binary point1 point2  point3 point4  point5 point4_Gender if smdate =="apr_2023", vce(robust)
ologit gender_imp_recode  gender_binary point1 point2  point3 point4  point5 point5_Gender if smdate =="apr_2023", vce(robust)


log close

